<?php
/*
+--------------------------------------------------------------------------
|   Anwsion [#RELEASE_VERSION#]
|   ========================================
|   by Tatfook Network Team
|   (c) 2011 - 2012 Anwsion Software
|   http://www.anwsion.com
|   ========================================
|   Support: zhengqiang@gmail.com
|   
+---------------------------------------------------------------------------
*/

class c_main_class extends AWS_CONTROLLER
{

	function get_permission_action()
	{
	
	}

	public function setup()
	{
		admin_session_class::check_admin_login($this->get_permission_action());
		
		$this->crumb("管理首页", "admin/main/");
	}

	public function index()
	{
		TPL::output("admin/admin_index");
	}

	public function left_action()
	{
		$menu_list = $this->model('admin_group')->get_avail_menu_by_group_id($this->user_info['group_id']);
		
		TPL::assign("list", $this->model('admin_group')->get_avail_menu_by_group_id($this->user_info['group_id']));
		
		TPL::output("admin/admin_left");
	}

	public function system_action()
	{
		if ($_GET['act'] == "phpinfo")
		{
			phpinfo();
			exit();
		}
		elseif ($_GET['act'] == "function")
		{
			echo "<pre>";
			Echo "这里显示系统所支持的所有函数,和自定义函数\n";
			print_r(get_defined_functions());
			echo "</pre>";
			exit();
		}
		else
		{
			TPL::output("admin/system");
		}
	}
}